package com.study.hot.jetpack.demo_shopping.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.study.hot.jetpack.demo_shopping.db.data.Product

/**
 * <pre>
 *     author : fauks
 *     time   : 2020/03/27
 *     desc   :
 * </pre>
 */
class ProductModel(val grade: Int) : ViewModel() {

    // 品牌观察值对象，默认观察所有品牌
    private val brand = MutableLiveData<String>().apply {
        value = ALL
    }

    // 商品观察者
    private val productList = MutableLiveData<List<Product>>()

    companion object {
        private const val ALL = "所有"
    }
}